//
//  DownloadOperation.h
//  Example13-2
//
//  Created by 孙晓晔 on 2017/4/25.
//  Copyright © 2017年 孙晓晔. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void(^completionDownloadImage)(NSString *url, UIImage *image);

@protocol DownloadOperationDelegate <NSObject>

-(void)didFinishDownloadImage:(NSString*)strURL image:(UIImage *)image;

@end

@interface DownloadOperation : NSOperation

@property(nonatomic,strong) NSString *strURL;

@property(nonatomic,strong) id<DownloadOperationDelegate> delegate;

/**
 *  回调
 */
@property (nonatomic,copy)completionDownloadImage block;
- (instancetype)initWithUrl:(NSString*)url;

@end
